﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebServiceInvoker;
namespace BookBuy
{
    public partial class DatMuaSach : BasePage
    {
        public List<string> dsttensach = new List<string>();
        public nxbTDTT.SachDTO[] dssachmoi;
        //public nxb_theducthethao.PublisherServices nxb = new nxb_theducthethao.PublisherServices();
        //public nxb_theducthethao.SachDTO[] dsSachMoi;
        //public nxb_theducthethao.TheLoaiDTO[] dsTheLoai;
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                // đăng nhập vào ws của nhà xuất bản
                //VanChuyen10.Service1Soap a = VanChuyen10.Service1SoapClient;            

                //string sID = (string)WebserviceInvoker.WSInvoker.CallWebService("http://nxb-theducthethao.somee.com/ws/PublisherServices.asmx", "PublisherServices", "DangNhap", new object[] { "ngocbinh", "123" });
                nxbTDTT.PublisherServices proxy = new nxbTDTT.PublisherServices();
                string sID = proxy.DangNhap("ngocbinh", "123");
                //sID = proxy.DangNhap("ngocbinh", "123");
                Session.Add("sID_NXB_TDTT", sID);
                dssachmoi = proxy.XemSachMoi(sID).Take(5).ToArray();  
            }
            catch
            { 
            
            }

        }
    }
}